using System.ComponentModel.DataAnnotations;

namespace RAG.Domain.Entities.App;

/// <summary>
/// 知识库实体
/// </summary>
public class KnowledgeBase : EntityBase
{
    public Guid KnowledgeBaseId { get; set; } //知识库id
    public Guid UserId { get; set; } //用户id
    
    [StringLength(100, ErrorMessage = "知识库名称长度不能超过100个字符")]
    public string KnowledgeBaseName { get; set; } = null!; //知识库名称
    
    [StringLength(500, ErrorMessage = "知识库描述长度不能超过500个字符")]
    public string? KnowledgeBaseDescription { get; set; } //知识库描述
    
    public bool IsPublic { get; set; } //是否公开
    
    // 导航属性
    public Users User { get; set; } = null!;
    public ICollection<Document> Documents { get; set; } = new List<Document>();
} 